body {
  background: #fff;
  color: #666;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.m-chatBox {
  margin: 0 auto;
  background: #f8f8f8;
  max-width: 800px;
  border: 1px solid #ddd;
  box-shadow: 0 0 5px rgba(0, 0, 0, .1);
  border-radius: 2px;
  display: flex;
}

.m-chatBox .header {
  border-bottom: 1px solid #ddd;
  padding: 20px;
}

/* 侧边 */
.m-chatBox .sider {
  width: 200px;
  border-right: 1px solid #eee;
}

.m-chatBox .sider .title{
  text-align: center;
  border-bottom: 1px solid #eee;
  margin: 0;
  line-height: 60px;
  font-weight: normal;
}

.m-chatBox .sider dl {
  margin: 0;
  line-height: 40px;
  color: #333;
  font-size: 12px;
}
.m-chatBox .sider dt {
  border-bottom: 1px solid #eee;
  line-height: 30px;
  padding: 0 10px;
}
.m-chatBox .sider dl dd {
  color: green;
  font-size: 16px;
  line-height: 30px;
  margin: 0;
}
.m-chatBox .sider ul {
  max-height: 500px;
  overflow-y: scroll;
}
.m-chatBox .sider dl dd li {
  border-bottom: 1px solid #eee;
  height: 30px;
  overflow: hidden;
  background: #fff;
  padding: 0 10px;
}

/* main */
.m-chatBox .box {
  height: 600px;
  overflow-y: scroll;
  border-bottom: 1px solid #ddd;
  padding: 20px;
  background: #fff;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.m-chatBox .box .list {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
.m-chatBox .box ul {
  overflow: scroll;
}
.m-chatBox .box li.my {
  text-align: right;
}
.m-chatBox .box .time {
  font-size: 12px;
  text-align: center;
  color: #999;
  margin-bottom: 5px;
}
.m-chatBox .box .name {
  margin-bottom: 5px;
  font-size: 12px;
  color: #999;
}
.m-chatBox .box .message{
  background: #eee;
  display: inline-block;
  max-width: 60%;
  max-height: 300px;
  overflow-y: scroll;
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 7px 10px;
  font-size: 14px;
}
.m-chatBox .box .message img {
  max-width: 100%;
}
/* 系统通知 */
.m-chatBox .box li.sys .name {
  color: red;
}
.m-chatBox .box li.sys .message {
  border: 1px solid red;
  background: #fff;
}

/* footer */
.m-chatBox .footer {
  border-top: 1px solid #eee;
  margin: 0 -20px;
  overflow: hidden;
}
.m-chatBox .footer .text {
  padding: 20px;
  height: 60px;
  background: #fff;
}
.m-chatBox .footer textarea {
  width: 100%;
  height: 100%;
  border: none;
  background: none;
  outline: none;
  font-size: 16px;
}
.m-chatBox .footer .enter {
  background: #666;
  color: #fff;
  width: 100px;
  text-align: center;
  line-height: 40px;
  border-radius: 5px;
  float: right;
  margin-right: 20px;
  cursor: pointer;
  transition: all .3s ease;
}
.m-chatBox .footer .enter:hover {
  background: #333;
}
.m-chatBox .mate {
  text-align: center;
  line-height: 25px;
  background: #EEE;
  margin: 0 -20px;
  font-size: 12px;
  display: none;
}

/* 登录页面 */
.m-login {
  visibility: hidden;
  visibility: visible;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, .8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.m-login .box {
  background: #fff;
  width: 400px;
  padding: 40px;
  border-radius: 10px;
}

.m-login .input {
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 5px;
  overflow: hidden;
}

.m-login .input input {
  border: none;
  display: block;
  width: 100%;
  outline: none;
  font-size: 20px;
  line-height: 20px;
}

.m-login .btn {
  width: 100px;
  background: #333;
  color: #fff;
  text-align: center;
  line-height: 40px;
  border-radius: 5px;
  transition: all .3s ease;
  cursor: pointer;
}
.m-login .btn:hover {
  background: #000;
}

.m-info {
  text-align: center;
  font-size: 12px;
  line-height: 30px;
}
.m-info, .m-info a {
  color: #ccc;
  text-decoration: none;
}

/* 移动端 */
@media screen and (max-width: 750px) {
  html, body {
    margin: 0;
    height: 100%;
  }
  .m-info{ display: none; }
  .m-chatBox {
    display: block;
    position: relative;
    overflow: hidden;
    height: 100%;
  }
  .m-chatBox .sider{
    position: absolute;
    left: -250px;
    top: 0;
    bottom: 0;
    box-shadow: 0 0 5px rgba(0, 0, 0, .3);
    background: #f8f8f8;
    transition: left ease .3s;
    z-index: 1;
  }
  .m-chatBox .mate {
    display: block;
  }
  .m-chatBox .bg {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0; background: rgba(0, 0, 0, .3);
    z-index: 0;
    display: none;
  }
  .m-chatBox.open .sider {
    left: 0;
  }
  .m-chatBox.open .bg {
    display: block;
  }
  .m-chatBox .box {
    height: 100%;
    box-sizing: border-box;
  }
  .m-login .box {
    margin: 20px;
  }
}